package com.sense.kukoo.biz_me.view

import com.alibaba.android.arouter.facade.annotation.Route
import com.sense.kukoo.biz_me.R
import com.sense.kukoo.biz_me.databinding.BizMeActivityAboutBinding
import com.sense.kukoo.biz_me.vm.AboutViewModel
import com.sense.kukoo.common.constant.ARouterUrl
import com.sense.kukoo.common.mvvm.view.BaseMvvmActivity
import com.sense.kukoo.common.utils.AppUtil

@Route(path = ARouterUrl.ROUTE_ME_MODULE_ABOUT_ACTIVITY)
class AboutActivity : BaseMvvmActivity<AboutViewModel, BizMeActivityAboutBinding>() {

    override fun getLayoutId(): Int = R.layout.biz_me_activity_about

    override fun getViewModelClass(): Class<AboutViewModel> = AboutViewModel::class.java

    override fun responseVM(action: Int) {}

    override fun initData() {
        mBinding.lifecycleOwner = this
        mBinding.vm = mViewModel
        mBinding.titleView.init(this)
        setSupportActionBar(mBinding.titleView)
    }

    override fun initView() {
        val appVersionStr = AppUtil.getAppVersion(false)
        mBinding.tvAppVersion.text = getString(com.sense.kukoo.common_i18n.R.string.about_app_version, appVersionStr)
    }
}